Ever smacked yourself on the head because you didn’t launch that long-running command inside a screen?
Well, reptyr saves the day. It’s a nifty little tool that reallocates the PTY to any of your running processes.
Have a look at the github page: https://github.com/nelhage/reptyr
Got a long-running process? Simply run
reptyr
and reptyr will change the PTY of the process, suddenly taking input for it from the screen terminal and writing output to the screen terminal.
Awesome!
Thanks Bram